package com.example.tiku7;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.List;

public class Vp_Fragment extends FragmentPagerAdapter {

    List<Fragment> fr;

    public Vp_Fragment(@NonNull FragmentManager fm, List<Fragment> fr) {
        super(fm);
        this.fr = fr;
    }

    public Vp_Fragment(@NonNull FragmentManager fm) {
        super(fm);
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return fr.get(position);
    }

    @Override
    public int getCount() {
        return fr.size();
    }
}
